import React from 'react';
import {
  HashRouter as Router,
  Route,
  Switch,
  Redirect
} from 'react-router-dom';
import { connect } from 'react-redux';
import MainLayoutRoute from './MainLayoutRoute';
import SignIn from '../views/modules/SignIn';

const Routers = (props) => {
  return (
    <Router>
      <div>
        <Switch>
          <Route path="/signIn" component={SignIn} />
          <Route path="/wed" component={ MainLayoutRoute } />
          <Route render={() => {
            return (<h3>404页面</h3>);
          }}
          />
        </Switch>
      </div>
    </Router>
  );
};
const MainStateToProps = function (state) {
  return {
    user: state.userInfo
  };
};

export default connect(MainStateToProps, { })(Routers);
